package com.slz3.business.module.configManagement.conActivityForecast.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conActivityForecast.domain.ConActivityForecast;
import com.slz3.business.module.configManagement.conActivityForecast.domain.ConActivityForecastCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConActivityForecastResController {

    static Mono<ServerResponse> add(ServerRequest req, ConActivityForecast conActivityForecast) {
        if (ConActivityForecastResUnsafeValid.add(req, conActivityForecast)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.add_$ConActivityForecastUpdateLock(req, conActivityForecast);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        if (ConActivityForecastResUnsafeValid.delete(req, conActivityForecastCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.delete_$ConActivityForecastUpdateLock(req, conActivityForecastCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, ConActivityForecast conActivityForecast) {
        if (ConActivityForecastResUnsafeValid.modify(req, conActivityForecast)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.modify_$ConActivityForecastUpdateLock(req, conActivityForecast);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (ConActivityForecastResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (ConActivityForecastResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.info_$ConActivityForecastUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (ConActivityForecastResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        //
        if (ConActivityForecastResUnsafeValid.auditSubmit(req, conActivityForecastCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.auditSubmit_$ConActivityForecastUpdateLock(req, conActivityForecastCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        if (ConActivityForecastResUnsafeValid.audit(req, conActivityForecastCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.audit_$ConActivityForecastUpdateLock(req, conActivityForecastCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        if (ConActivityForecastResUnsafeValid.auditReject(req, conActivityForecastCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.auditReject_$ConActivityForecastUpdateLock(req, conActivityForecastCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        if (ConActivityForecastResUnsafeValid.usingEnable(req, conActivityForecastCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.usingEnable_$ConActivityForecastUpdateLock(req, conActivityForecastCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, ConActivityForecastCondition conActivityForecastCondition) {
        if (ConActivityForecastResUnsafeValid.usingDisable(req, conActivityForecastCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConActivityForecastResAtomic.usingDisable_$ConActivityForecastUpdateLock(req, conActivityForecastCondition);
        }
    }

}
